<script lang="ts" setup>
import { ElButton } from 'element-plus';
import { useAuthStore } from '@/store';

defineOptions({
  name: 'Login',
});
const handleLogin = async (str: string) => {
  await authStore.userLogin({ account: str, password: str });
};

const authStore = useAuthStore();
</script>

<template>
  <div class="m-10">
    <div class="text-blue-400">登录页面</div>
    <ElButton type="primary" @click="() => handleLogin('admin')">
      超管登录
    </ElButton>

    <ElButton type="primary" @click="() => handleLogin('yanfa')">
      研发人员登录
    </ElButton>

    <ElButton type="primary" @click="() => handleLogin('yunwei')">
      运维人员登录
    </ElButton>
  </div>
</template>
<style scoped lang="scss"></style>
